package name.jiaosha.air.system.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import name.jiaosha.air.system.dao.IAreaDao;
import name.jiaosha.air.system.domain.Area;
import name.jiaosha.air.system.service.IAreaService;

@Service
public class AreaService implements IAreaService {

	@Autowired
	private IAreaDao areaDao;

	@Override
	public List<Area> getDistrictByCityId(int cityId) {

		String jpql = "SELECT a FROM Area a WHERE a.cityId=?1";

		return areaDao.find(jpql, cityId);
	}

}
